home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / progrmng / exmpldrw.sit / For MPW / MPW Diffs / UStream.inc1.p.Diff next >
Encoding:
Text File  |  1990-07-01  |  2.0 KB  |  75 lines  |  [TEXT/MPS ]

  1. File #1: Big Block:Updated 21-25. ExampleDraw:UStream.inc1.p
  2. File #2: Big Block:21-25. ExampleDraw:UStream.inc1.p
  3.  
  4. Extra lines in 1st before 534 in 2nd (File "Big Block:Updated 21-25. ExampleDraw:UStream.inc1.p"; Line 534; File "Big Block:21-25. ExampleDraw:UStream.inc1.p"; Line ╞534)
  5.     fSize := newSize;
  6.  
  7.  
  8. Nonmatching lines (File "Big Block:Updated 21-25. ExampleDraw:UStream.inc1.p"; Line 602:604; File "Big Block:21-25. ExampleDraw:UStream.inc1.p"; Line 601:603)
  9. FUNCTION  TCountingStream.GetPosition: LONGINT; OVERRIDE;
  10. BEGIN
  11.     GetPosition := fPosition;
  12.  
  13. FUNCTION  TCountingStream.GetSize: LONGINT; OVERRIDE;
  14. BEGIN
  15.     GetSize := fPosition;
  16.  
  17.  
  18. Nonmatching lines (File "Big Block:Updated 21-25. ExampleDraw:UStream.inc1.p"; Line 608:611; File "Big Block:21-25. ExampleDraw:UStream.inc1.p"; Line 607:612)
  19. {$S StreamUtil}
  20. FUNCTION  TCountingStream.GetSize: LONGINT; OVERRIDE;
  21. BEGIN
  22.     GetSize := fSize;
  23.  
  24. {$S StreamCreate}
  25. PROCEDURE TCountingStream.ICountingStream;
  26. BEGIN
  27.     SELF.IStream;
  28.     
  29.     fPosition := 0;
  30.  
  31.  
  32. Extra lines in 1st before 616 in 2nd (File "Big Block:Updated 21-25. ExampleDraw:UStream.inc1.p"; Line 615:653; File "Big Block:21-25. ExampleDraw:UStream.inc1.p"; Line ╞616)
  33. {$S StreamCreate}
  34. PROCEDURE TCountingStream.ICountingStream;
  35. BEGIN
  36.     SELF.IStream;
  37.     
  38.     fPosition := 0;
  39.     fSize := 0;
  40. END;
  41.  
  42.  
  43. {$S StreamUtil}
  44. PROCEDURE TCountingStream.SetPosition(newPosition: LONGINT); OVERRIDE;
  45.     VAR    err:    OSErr;
  46. BEGIN
  47.     IF newPosition < 0 THEN                    { Same error returned by File Manager. }
  48.         FailOSErr(posErr)
  49.         
  50.     ELSE IF newPosition > fSize THEN        { Hit the end of the stream. }
  51.     BEGIN
  52.         newPosition := fSize;                { We still want to position to end of the stream. }
  53.         err := eofErr;
  54.     END
  55.     ELSE
  56.         err := noErr;
  57.         
  58.     fPosition := newPosition;
  59.     FailOSErr(err);
  60. END;
  61.  
  62.  
  63. {$S StreamUtil}
  64. PROCEDURE TCountingStream.SetSize(newSize: LONGINT); OVERRIDE;
  65. BEGIN
  66.     IF newSize < fPosition THEN        { If we shrunk the size, then we have to adjust the position. }
  67.         fPosition := newSize;
  68.     fSize := newSize;
  69. END;
  70.  
  71.  
  72.  
  73.  
  74. *** EOF on both files at the same time ***
  75.